﻿using Dict.DataModel;
using System.Collections;
using UnityEngine;
namespace Story
{
    class StepDelay : StepBase
    {
        protected override void OnStart()
        {
            float time;
            if (float.TryParse(actionParam1, out time))
            {
                storyManager.StartCoroutine(Wait(time));
            }
            else
            {
                End();
            }
        }
        private IEnumerator Wait(float time)
        {
            yield return new WaitForSeconds(time);
            End();
        }
    }
}